<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.4.2">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"example.com","root":"/","scheme":"Pisces","version":"7.8.0","exturl":true,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}};
  </script>

  <meta name="description" content="下载next主题cmd进入hexo目录 下载6.0版本的next git clone https:&#x2F;&#x2F;github.com&#x2F;theme-next&#x2F;hexo-theme-next themes&#x2F;next-reloaded本篇文章将介绍NexT的主题设定与配置 在Hexo 中有两份主要的配置文件，其名称都是_config.yml。其中，一份位于站点根目录下，主要包含 Hexo本身的配置；另一份位于主">
<meta property="og:type" content="article">
<meta property="og:title" content="HEXO下NEXT主题的安装和简单配置">
<meta property="og:url" content="http://example.com/2022/05/11/next_1/index.html">
<meta property="og:site_name" content="Hexo">
<meta property="og:description" content="下载next主题cmd进入hexo目录 下载6.0版本的next git clone https:&#x2F;&#x2F;github.com&#x2F;theme-next&#x2F;hexo-theme-next themes&#x2F;next-reloaded本篇文章将介绍NexT的主题设定与配置 在Hexo 中有两份主要的配置文件，其名称都是_config.yml。其中，一份位于站点根目录下，主要包含 Hexo本身的配置；另一份位于主">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="http://example.com/images/COS%E7%BE%8E%E5%A5%B3%E9%99%88%E6%BD%874k%E7%94%B5%E8%84%91%E5%A3%81%E7%BA%B8.jpg">
<meta property="article:published_time" content="2022-05-10T23:39:04.000Z">
<meta property="article:modified_time" content="2022-05-10T23:44:53.108Z">
<meta property="article:author" content="YTNetMan">
<meta property="article:tag" content="Next HEXO  Gitee">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://example.com/images/COS%E7%BE%8E%E5%A5%B3%E9%99%88%E6%BD%874k%E7%94%B5%E8%84%91%E5%A3%81%E7%BA%B8.jpg">

<link rel="canonical" href="http://example.com/2022/05/11/next_1/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>HEXO下NEXT主题的安装和简单配置 | Hexo</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">Hexo</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-about">

    <a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
        <li class="menu-item menu-item-schedule">

    <a href="/schedule/" rel="section"><i class="fa fa-calendar fa-fw"></i>日程表</a>

  </li>
        <li class="menu-item menu-item-sitemap">

    <a href="/sitemap.xml" rel="section"><i class="fa fa-sitemap fa-fw"></i>站点地图</a>

  </li>
        <li class="menu-item menu-item-commonweal">

    <a href="/404/" rel="section"><i class="fa fa-heartbeat fa-fw"></i>公益 404</a>

  </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://example.com/2022/05/11/next_1/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/ylh.jpg">
      <meta itemprop="name" content="YTNetMan">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Hexo">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          HEXO下NEXT主题的安装和简单配置
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              

              <time title="创建时间：2022-05-11 07:39:04 / 修改时间：07:44:53" itemprop="dateCreated datePublished" datetime="2022-05-11T07:39:04+08:00">2022-05-11</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E6%95%99%E7%A8%8B-WEB/" itemprop="url" rel="index"><span itemprop="name">教程  WEB</span></a>
                </span>
            </span>

          
            <span id="/2022/05/11/next_1/" class="post-meta-item leancloud_visitors" data-flag-title="HEXO下NEXT主题的安装和简单配置" title="阅读次数">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span class="leancloud-visitors-count"></span>
            </span>
            <span class="post-meta-item" title="阅读次数" id="busuanzi_container_page_pv" style="display: none;">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span id="busuanzi_value_page_pv"></span>
            </span>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <hr>
<p>下载next主题<br>cmd<br>进入hexo目录</p>
<p>下载6.0版本的next</p>
<h2 id="git-clone-https-github-com-theme-next-hexo-theme-next-themes-next-reloaded"><a href="#git-clone-https-github-com-theme-next-hexo-theme-next-themes-next-reloaded" class="headerlink" title="git clone https://github.com/theme-next/hexo-theme-next themes/next-reloaded"></a>git clone <span class="exturl" data-url="aHR0cHM6Ly9naXRodWIuY29tL3RoZW1lLW5leHQvaGV4by10aGVtZS1uZXh0">https://github.com/theme-next/hexo-theme-next<i class="fa fa-external-link-alt"></i></span> themes/next-reloaded</h2><p>本篇文章将介绍NexT的主题设定与配置</p>
<pre><code>在Hexo 中有两份主要的配置文件，其名称都是_config.yml。其中，一份位于站点根目录下，主要包含 Hexo本身的配置；另一份位于主题目录下，这份配置由主题作者提供，主要用于配置主题相关的选项。
我们约定，将前者称为 站点配置文件，后者称为 主题配置文件
</code></pre>
<p>主题设定<br>选择 Scheme</p>
<p>Scheme 是 NexT提供的一种特性，借助于Scheme``，NexT 为你提供多种不同的外观。同时，几乎所有的配置都可以 在 Scheme 之间共用。目前 NexT 支持三种 Scheme，他们是：</p>
<p>-Muse- 默认 Scheme，这是NexT最初的版本，黑白主调，大量留白</p>
<ul>
<li>Mist- Muse 的紧凑版本，整洁有序的单栏外观</li>
<li>Pisces- 双栏 Scheme，小家碧玉似的清新</li>
</ul>
<p>Scheme的切换通过更改主题配置文件，搜索scheme关键字。 你会看到有三行 scheme的配置，将你需用启用的 scheme 前面注释 # 去除即可。</p>
<p>选择 Pisces Scheme<br>#scheme: Muse<br>#scheme: Mist<br>scheme: Pisces</p>
<p>设置 语言</p>
<h1 id="hero下的config文件"><a href="#hero下的config文件" class="headerlink" title="hero下的config文件"></a>hero下的config文件</h1><p>编辑站点配置文件， 将 language设置成你所需要的语言。建议明确设置你所需要的语言，例如选用简体中文，配置如下：（H:\yqg\blog\hexo\themes\next\languages 下的文件名）</p>
<p>language: zh-CN</p>
<p>设置 菜单</p>
<p>菜单配置包括三个部分，第一是菜单项（名称和链接），第二是菜单项的显示文本，第三是菜单项对应的图标。 NexT 使用的是Font Awesome提供的图标，Font Awesome 提供了 600+的图标，可以满足绝大的多数的场景，同时无须担心在Retina 屏幕下 图标模糊的问题。</p>
<p>编辑主题配置文件<br>，修改以下内容：</p>
<p>1、 设定菜单内容，对应的字段是menu。 菜单内容的设置格式是：item name:link。其中 item name 是一个名称，这个名称并不直接显示在页面上，她将用于匹配图标以及翻译。</p>
<p>menu:<br>  home: /<br>  archives: /archives<br>  #about: /about<br>  #categories: /categories<br>  tags: /tags<br>  #commonweal: /404.html</p>
<pre><code>若你的站点运行在子目录中，请将链接前缀的 /去掉
</code></pre>
<p>NexT默认的菜单项有（标注 的项表示需要手动创建这个页面）：<br>键值    设定值    显示文本（简体中文）<br>home    home: /    主页<br>archives    archives: /archives    归档页<br>categories    categories: /categories    分类页<br>tags    tags: /tags    标签页<br>about    about: /about    关于页面<br>commonweal    commonweal: /404.html    公益 404</p>
<p>2、 设置菜单项的显示文本。在第一步中设置的菜单的名称并不直接用于界面上的展示。Hexo在生成的时候将使用 这个名称查找对应的语言翻译，并提取显示文本。这些翻译文本放置在NexT 主题目录下的languages/{language}.yml（{language} 为你所使用的语言）。</p>
<p>以简体中文为例，若你需要添加一个菜单项，比如 something。那么就需要修改简体中文对应的翻译文件languages/zh-Hans.yml，在 menu字段下添加一项：</p>
<p>menu:<br>  home: 首页<br>  archives: 归档<br>  categories: 分类<br>  tags: 标签<br>  about: 关于<br>  search: 搜索</p>
<p>3、 设定菜单项的图标，对应的字段是menu_icons。 此设定格式是item name: icon name，其中 item name与上一步所配置的菜单名字对应，icon name是 Font Awesome 图标的 名字。而enable可用于控制是否显示图标，你可以设置成false来去掉图标。</p>
<p>menu_icons:<br>  enable: true</p>
<h1 id="Icon-Mapping"><a href="#Icon-Mapping" class="headerlink" title="Icon Mapping."></a>Icon Mapping.</h1><p>  home: home<br>  about: user<br>  categories: th<br>  tags: tags<br>  archives: archive<br>  commonweal: heartbeat</p>
<pre><code>在菜单图标开启的情况下，如果菜单项与菜单未匹配（没有设置或者无效的 Font Awesome图标名字） 的情况下，NexT 将会使用 作为图标。
</code></pre>
<p>设置侧栏</p>
<p>默认情况下，侧栏仅在文章页面（拥有目录列表）时才显示，并放置于右侧位置。 可以通过修改 主题配置文件<br>中的 sidebar 字段来控制侧栏的行为。侧栏的设置包括两个部分，其一是侧栏的位置， 其二是侧栏显示的时机。</p>
<p>1、设置侧栏的位置，修改 sidebar.position的值，支持的选项有：</p>
<pre><code>left - 靠左放置
right- 靠右放置
</code></pre>
<p>sidebar:<br>  position: left</p>
<p>2、 设置侧栏显示的时机，修改sidebar.display的值，支持的选项有：</p>
<pre><code>post - 默认行为，在文章页面（拥有目录列表）时显示
always - 在所有页面中都显示
hide - 在所有页面中都隐藏（可以手动展开）
remove - 完全移除
</code></pre>
<p>sidebar:<br>  display: post</p>
<p>设置 头像</p>
<p>编辑 主题配置文件<br>， 修改字段 avatar， 值设置成头像的链接地址。其中，头像的链接地址可以是：<br>地址    值<br>完整的互联网    URI:<a href="http://example.com/avatar.png">http://example.com/avatar.png</a><br>站点内的地址    将头像放置主题目录下的source/uploads/（新建 uploads 目录若不存在） 配置为：avatar: /uploads/avatar.png或者 放置在 source/images/ 目录下, 配置为：avatar: /images/avatar.png</p>
<p>avatar: <a href="http://example.com/avatar.png">http://example.com/avatar.png</a></p>
<p>设置 作者昵称</p>
<p>编辑 站点配置文件， 设置author为你的昵称。</p>
<p>站点描述<br>编辑 站点配置文件， 设置 description字段为你的站点描述。站点描述可以是你喜欢的一句签名:)</p>
<p>老规矩，MM顶楼：</p>
<p><img src="/../images/COS%E7%BE%8E%E5%A5%B3%E9%99%88%E6%BD%874k%E7%94%B5%E8%84%91%E5%A3%81%E7%BA%B8.jpg" alt="COS美女陈潇4k电脑壁纸"></p>

    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/Next-HEXO-Gitee/" rel="tag"># Next HEXO  Gitee</a>
          </div>

        
  <div class="post-widgets">
    <div class="wp_rating">
      <div id="wpac-rating"></div>
    </div>
  </div>


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2022/05/06/MyTemplate/" rel="prev" title="我的模板">
      <i class="fa fa-chevron-left"></i> 我的模板
    </a></div>
      <div class="post-nav-item">
    <a href="/2022/05/11/Typora/" rel="next" title="Typora最后一个免费版本">
      Typora最后一个免费版本 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#git-clone-https-github-com-theme-next-hexo-theme-next-themes-next-reloaded"><span class="nav-number">1.</span> <span class="nav-text">git clone https:&#x2F;&#x2F;github.com&#x2F;theme-next&#x2F;hexo-theme-next themes&#x2F;next-reloaded</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#hero%E4%B8%8B%E7%9A%84config%E6%96%87%E4%BB%B6"><span class="nav-number"></span> <span class="nav-text">hero下的config文件</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#Icon-Mapping"><span class="nav-number"></span> <span class="nav-text">Icon Mapping.</span></a></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="YTNetMan"
      src="/images/ylh.jpg">
  <p class="site-author-name" itemprop="name">YTNetMan</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">7</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">4</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">4</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
        <span class="exturl" data-url="aHR0cHM6Ly95dG5ldG1hbi5naXRlZS5pbw==" title="Gitee → https:&#x2F;&#x2F;ytnetman.gitee.io"><i class="fab fa-github fa-fw"></i>Gitee</span>
      </span>
      <span class="links-of-author-item">
        <span class="exturl" data-url="bWFpbHRvOnlhbmdxaWd1YW5nQDE4OS5jbg==" title="E-Mail → mailto:yangqiguang@189.cn"><i class="fa fa-envelope fa-fw"></i>E-Mail</span>
      </span>
      <span class="links-of-author-item">
        <span class="exturl" data-url="aHR0cHM6Ly93ZWliby5jb20veXRuZXRtYW4=" title="Weibo → https:&#x2F;&#x2F;weibo.com&#x2F;ytnetman"><i class="fab fa-weibo fa-fw"></i>Weibo</span>
      </span>
      <span class="links-of-author-item">
        <span class="exturl" data-url="aHR0cHM6Ly9wbHVzLmdvb2dsZS5jb20veXRuZXRtYW4=" title="Google → https:&#x2F;&#x2F;plus.google.com&#x2F;ytnetman"><i class="fab fa-google fa-fw"></i>Google</span>
      </span>
  </div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2022</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">YTNetMan</span>
</div>
  <div class="powered-by">由 <span class="exturl theme-link" data-url="aHR0cHM6Ly9oZXhvLmlv">Hexo</span> & <span class="exturl theme-link" data-url="aHR0cHM6Ly9waXNjZXMudGhlbWUtbmV4dC5vcmc=">NexT.Pisces</span> 强力驱动
  </div>

        
<div class="busuanzi-count">
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    <span class="post-meta-item" id="busuanzi_container_site_uv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-user"></i>
      </span>
      <span class="site-uv" title="总访客量">
        <span id="busuanzi_value_site_uv"></span>
      </span>
    </span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item" id="busuanzi_container_site_pv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="site-pv" title="总访问量">
        <span id="busuanzi_value_site_pv"></span>
      </span>
    </span>
</div>






<script>
  (function() {
    function leancloudSelector(url) {
      url = encodeURI(url);
      return document.getElementById(url).querySelector('.leancloud-visitors-count');
    }

    function addCount(Counter) {
      var visitors = document.querySelector('.leancloud_visitors');
      var url = decodeURI(visitors.id);
      var title = visitors.dataset.flagTitle;

      Counter('get', '/classes/Counter?where=' + encodeURIComponent(JSON.stringify({ url })))
        .then(response => response.json())
        .then(({ results }) => {
          if (results.length > 0) {
            var counter = results[0];
            leancloudSelector(url).innerText = counter.time + 1;
            Counter('put', '/classes/Counter/' + counter.objectId, { time: { '__op': 'Increment', 'amount': 1 } })
              .catch(error => {
                console.error('Failed to save visitor count', error);
              });
          } else {
              leancloudSelector(url).innerText = 'Counter not initialized! More info at console err msg.';
              console.error('ATTENTION! LeanCloud counter has security bug, see how to solve it here: https://github.com/theme-next/hexo-leancloud-counter-security. \n However, you can still use LeanCloud without security, by setting `security` option to `false`.');
            
          }
        })
        .catch(error => {
          console.error('LeanCloud Counter Error', error);
        });
    }

    function showTime(Counter) {
      var visitors = document.querySelectorAll('.leancloud_visitors');
      var entries = [...visitors].map(element => {
        return decodeURI(element.id);
      });

      Counter('get', '/classes/Counter?where=' + encodeURIComponent(JSON.stringify({ url: { '$in': entries } })))
        .then(response => response.json())
        .then(({ results }) => {
          for (let url of entries) {
            let target = results.find(item => item.url === url);
            leancloudSelector(url).innerText = target ? target.time : 0;
          }
        })
        .catch(error => {
          console.error('LeanCloud Counter Error', error);
        });
    }

    let { app_id, app_key, server_url } = {"enable":true,"app_id":null,"app_key":null,"server_url":null,"security":true};
    function fetchData(api_server) {
      var Counter = (method, url, data) => {
        return fetch(`${api_server}/1.1${url}`, {
          method,
          headers: {
            'X-LC-Id'     : app_id,
            'X-LC-Key'    : app_key,
            'Content-Type': 'application/json',
          },
          body: JSON.stringify(data)
        });
      };
      if (CONFIG.page.isPost) {
        if (CONFIG.hostname !== location.hostname) return;
        addCount(Counter);
      } else if (document.querySelectorAll('.post-title-link').length >= 1) {
        showTime(Counter);
      }
    }

    let api_server = app_id.slice(-9) !== '-MdYXbMMI' ? server_url : `https://${app_id.slice(0, 8).toLowerCase()}.api.lncldglobal.com`;

    if (api_server) {
      fetchData(api_server);
    } else {
      fetch('https://app-router.leancloud.cn/2/route?appId=' + app_id)
        .then(response => response.json())
        .then(({ api_server }) => {
          fetchData('https://' + api_server);
        });
    }
  })();
</script>


      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/pisces.js"></script>


<script src="/js/next-boot.js"></script>




  



  <script>
  if (CONFIG.page.isPost) {
    wpac_init = window.wpac_init || [];
    wpac_init.push({
      widget: 'Rating',
      id    : ,
      el    : 'wpac-rating',
      color : 'fc6423'
    });
    (function() {
      if ('WIDGETPACK_LOADED' in window) return;
      WIDGETPACK_LOADED = true;
      var mc = document.createElement('script');
      mc.type = 'text/javascript';
      mc.async = true;
      mc.src = '//embed.widgetpack.com/widget.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(mc, s.nextSibling);
    })();
  }
  </script>












  

  

</body>
</html>
